<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Year extends Model
{
    protected $casts = [
        'id' => 'integer',
        'value' => 'integer',
        'remark' => 'string'
    ];

    protected $fillable = [
        'value', 'remark'
    ];

    protected $hidden = [
        'created_at', 'updated_at', 'remark' ,'user_score', 'score'
    ];

    public function score()
    {
        return $this->hasOne(Score::class);
    }

    public function user_score()
    {
        return $this->hasMany(UserScore::class);
    }
}
